home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
unclcarl
/
gfahelp1
/
cursor.lst
< prev
next >
Wrap
File List
|
1995-04-25
|
2KB
|
44 lines
REM Press UNDO to quit ! Only prints the letter "A" in caps.
'
PRINT CHR$(27)+"e"; ! Create a cursor
column|=1 ! Set cursor position
line|=1
leave!=FALSE
DO
' Use TEXT commands as PRINT commands will conflict with the cursor
DEFTEXT 1,0,0,6
TEXT 10,180,"line: "+STR$(line|)+" "
TEXT 10,160,"column: "+STR$(column|)+" "
SELECT INP(2) ! Select a key
CASE 200,94 ! Arrow up
PRINT CHR$(27)+"A"; ! Cursor up
IF line|>1 ! If the line is greater than 1
DEC line| ! DECrease it.
ENDIF
CASE 208 ! Arrow down
PRINT CHR$(27)+"B"; ! Cursor down
IF line|<25 ! If line is less than 25
INC line| ! INCrease it
ENDIF
CASE 205,62 ! Arrow right
PRINT CHR$(27)+"C"; ! Cursor right
IF column|<80
INC column|
ENDIF
CASE 203,60,8 ! Arrow left
PRINT CHR$(27)+"D"; ! Cursor left
IF column|>1
DEC column|
ENDIF
CASE 65 ! Prints the letter A
PRINT "A";
CASE 27 ! ESC key jump to left
IF column|>1
PRINT AT(1,line|);CHR$(27)+"e";
column|=1
ENDIF
CASE 225 ! UNDO key
EXIT IF TRUE
ENDSELECT
LOOP